package com.jplus.framework.mvc.bean;

/**
 * 封装返回数据
 *
 * @author huangyong
 * @since 1.0
 */
public class Result {

	private boolean succ; // 成功标志
	private int err; // 错误代码
	private Object data; // 相关数据

	public Result(boolean success) {
		this.succ = success;
	}

	public Result error(int error) {
		this.err = error;
		return this;
	}

	public Result data(Object data) {
		this.data = data;
		return this;
	}

	public boolean isSucc() {
		return succ;
	}

	public void setSucc(boolean succ) {
		this.succ = succ;
	}

	public int getErr() {
		return err;
	}

	public void setErr(int err) {
		this.err = err;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}
